// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_CHK_QUALITY_CHECKING_ITEM
// * CreateDate    : 2011-11-23 16:43:06
// * Creater       : CodeSmith
// * LastChangeDate: 2011-11-23 16:43:06
// * LastChanger   : 2011-11-23 16:43:06
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
    [Serializable]
    public partial class ChkQualityCheckingItemEntity : EntityBase
    {
        public ChkQualityCheckingItemTable TableSchema
        {
            get
            {
                return ChkQualityCheckingItemTable.Current;
            }
        }

        public ChkQualityCheckingItemEntity()
        {

        }

        public ChkQualityCheckingItemEntity(DataRow dr)
        {
            if (dr == null)
            {
                return;
            }
            this.CheckingItemId = Convert.ToString(CommonFunctions.ToObject(dr["CHECKING_ITEM_ID"]));
            this.CheckingId = Convert.ToString(CommonFunctions.ToObject(dr["CHECKING_ID"]));
            this.RelatedItemId = Convert.ToString(CommonFunctions.ToObject(dr["RELATED_ITEM_ID"]));
            this.RelatedItemQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["RELATED_ITEM_QTY"]));
            this.NgQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["NG_QTY"]));
            this.CheckingFunction = Convert.ToString(CommonFunctions.ToObject(dr["CHECKING_FUNCTION"]));
            this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
        }

        public ChkQualityCheckingItemEntity(DataRowView dr)
        {
            if (dr == null)
            {
                return;
            }
            this.CheckingItemId = Convert.ToString(CommonFunctions.ToObject(dr["CHECKING_ITEM_ID"]));
            this.CheckingId = Convert.ToString(CommonFunctions.ToObject(dr["CHECKING_ID"]));
            this.RelatedItemId = Convert.ToString(CommonFunctions.ToObject(dr["RELATED_ITEM_ID"]));
            this.RelatedItemQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["RELATED_ITEM_QTY"]));
            this.NgQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["NG_QTY"]));
            this.CheckingFunction = Convert.ToString(CommonFunctions.ToObject(dr["CHECKING_FUNCTION"]));
            this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return ChkQualityCheckingItemTable.Current;
            }
        }

        #region Perporty List
        public string CheckingItemId
        {
            get { return Convert.ToString(GetData(ChkQualityCheckingItemTable.C_CHECKING_ITEM_ID)); }
            set { SetData(ChkQualityCheckingItemTable.C_CHECKING_ITEM_ID, value); }
        }

        public string CheckingId
        {
            get { return Convert.ToString(GetData(ChkQualityCheckingItemTable.C_CHECKING_ID)); }
            set { SetData(ChkQualityCheckingItemTable.C_CHECKING_ID, value); }
        }

        public string RelatedItemId
        {
            get { return Convert.ToString(GetData(ChkQualityCheckingItemTable.C_RELATED_ITEM_ID)); }
            set { SetData(ChkQualityCheckingItemTable.C_RELATED_ITEM_ID, value); }
        }

        public decimal RelatedItemQty
        {
            get { return Convert.ToDecimal(GetData(ChkQualityCheckingItemTable.C_RELATED_ITEM_QTY)); }
            set { SetData(ChkQualityCheckingItemTable.C_RELATED_ITEM_QTY, value); }
        }

        public decimal NgQty
        {
            get { return Convert.ToDecimal(GetData(ChkQualityCheckingItemTable.C_NG_QTY)); }
            set { SetData(ChkQualityCheckingItemTable.C_NG_QTY, value); }
        }

        public string CheckingFunction
        {
            get { return Convert.ToString(GetData(ChkQualityCheckingItemTable.C_CHECKING_FUNCTION)); }
            set { SetData(ChkQualityCheckingItemTable.C_CHECKING_FUNCTION, value); }
        }

        public string Remark
        {
            get { return Convert.ToString(GetData(ChkQualityCheckingItemTable.C_REMARK)); }
            set { SetData(ChkQualityCheckingItemTable.C_REMARK, value); }
        }

        #endregion
    }


}

